import {setItem,getItem} from '@/utils/cookies';

export default {
    namespaced:true,
    state:()=>({
        sidebarOpened:true,
        language:getItem('language') || 'zh'
    }),
    mutations:{
        set_sidebarOpened(state){
            state.sidebarOpened = !state.sidebarOpened;
        },
        set_language(state,data){
            setItem('language',data);
            state.language = data;
        }
    }
};